package com.shanpin.shebao.model.order;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.shanpin.core.utils.DateUtil;

/***
 * 补缴对象 表：t_sb_buy_order_added
 * 
 * @author 品讯科技
 * 
 */
public class Added {

	private String added_no;
	private String title;
	private int pay_uid;
	private String id_card;
	private int city_code;
	private String reason;
	private double amount;
	private String orders;
	private String months;
	private int pay_channel;
	private String pay_no;
	private int status;
	private String gen_time;

	public static RowMapper<Added> mapper = new RowMapper<Added>() {

		@Override
		public Added mapRow(ResultSet rs, int rowNum) throws SQLException {
			Added a = new Added();
			a.added_no = rs.getString("added_no");
			a.title = rs.getString("title");
			a.pay_uid = rs.getInt("pay_uid");
			a.id_card = rs.getString("id_card");
			a.city_code = rs.getInt("city_code");
			a.reason = rs.getString("reason");
			a.amount = rs.getDouble("amount");
			a.orders = rs.getString("orders");
			a.months = rs.getString("months");
			a.status = rs.getInt("status");
			return a;
		}
	};	
	
	public static final String PAY_F = "SELECT pay_uid,amount,status,orders ";
	public static RowMapper<Added> payMapper = new RowMapper<Added>() {

		@Override
		public Added mapRow(ResultSet rs, int rowNum) throws SQLException {
			Added a = new Added();
			a.pay_uid = rs.getInt("pay_uid");
			a.amount = rs.getDouble("amount");
			a.status = rs.getInt("status");
			a.orders = rs.getString("orders");
			return a;
		}
	};
	
	public static RowMapper<Added> repayMapper = new RowMapper<Added>() {

		@Override
		public Added mapRow(ResultSet rs, int rowNum) throws SQLException {
			Added a = new Added();
			a.reason = rs.getString("reason");
			a.amount = rs.getDouble("amount");
			a.pay_channel = rs.getInt("pay_channel");
			a.pay_no = rs.getString("pay_no");
			a.status = rs.getInt("status");
			a.gen_time = DateUtil.dateStr(rs.getTimestamp("gen_time"));
			return a;
		}
	};
	
	public String getAdded_no() {
		return added_no;
	}

	public void setAdded_no(String added_no) {
		this.added_no = added_no;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getPay_uid() {
		return pay_uid;
	}

	public void setPay_uid(int pay_uid) {
		this.pay_uid = pay_uid;
	}

	public String getId_card() {
		return id_card;
	}

	public void setId_card(String id_card) {
		this.id_card = id_card;
	}

	public int getCity_code() {
		return city_code;
	}

	public void setCity_code(int city_code) {
		this.city_code = city_code;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public String getOrders() {
		return orders;
	}

	public void setOrders(String orders) {
		this.orders = orders;
	}

	public String getMonths() {
		return months;
	}

	public void setMonths(String months) {
		this.months = months;
	}

	public int getPay_channel() {
		return pay_channel;
	}

	public void setPay_channel(int pay_channel) {
		this.pay_channel = pay_channel;
	}

	public String getPay_no() {
		return pay_no;
	}

	public void setPay_no(String pay_no) {
		this.pay_no = pay_no;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getGen_time() {
		return gen_time;
	}

	public void setGen_time(String gen_time) {
		this.gen_time = gen_time;
	}


}
